#include<bits/stdc++.h>
using namespace std;
int n, k;
const int maxn = 100000+8;
int memoddm[105][maxn];
int memome[105][maxn];
bool judgeddm(int);
bool judgeme(int x) {
    if(x<=0 )return true;
    if(x<=k+2) return false;
    for(int i=max(x-k-2,1); i<=x-3; ++i) {
        bool ans;
        if(memome[k][i]!=-1) ans = memome[k][i];
        else ans=judgeddm(i);
        if(ans==false) {
            return true;
        }
    }
    return false;
}
bool judgeddm(int x) {
    //assert(x<=0)
    if(x<=0) return true;
    if(x <= k+2) return false;
    for(int i=max(x-k-2, 1); i<=x-3; ++i) {
        bool ans;
        if(memoddm[k][i]!=-1) ans=memoddm[k][i];
        else ans = judgeme(i);
        if(ans==false) {
            return true;
        }
    }
    return false;
}

int main() {
    int tc; cin>>tc;
    memset(memome, -1, sizeof(memome));
    memset(memoddm, -1, sizeof(memoddm));
    while(tc--) {
        cin>>n>>k;
        if(judgeddm(n)) {
            cout<<"ddm yyds\n";
        }
        else {
            cout<<"ddm cry\n";
        }
    }
}
